#ifndef DEVICEMANAGE_H
#define DEVICEMANAGE_H

#include <QWidget>
#include <QTableView>
#include <QHeaderView>
#include <QDateTime>
#include <QMouseEvent>
#include "logclass.h"
#include "sqlitemanage.h"
#include "settingmanage.h"
#include "adddevicegroup.h"
#include "modigroupdialog.h"
#include "groupdeletedialog.h"
#include "admindevicemanage.h"
QT_BEGIN_NAMESPACE
namespace Ui { class DeviceManage; }
QT_END_NAMESPACE


class DeviceManage : public QWidget
{
    Q_OBJECT

public:
    DeviceManage(QWidget *parent = nullptr);
    ~DeviceManage();
    void loadComboxData();
    bool addDialog();
    bool modiDialog();
    bool deleteDialog();
    void setUserName(QString &name);
public slots:
    void applyFilter();
    void clearFilter();

protected:
    bool eventFilter(QObject *watched, QEvent *event) override;



private:
    Ui::DeviceManage *ui;
    SqliteManage *m_pSqliteManage;
    SettingManage *m_pSettingManage;
    AddDeviceGroup *m_pAddDeviceGroup;
    ModiGroupDialog *m_pModiGroup;
    GroupDeleteDialog *m_pDeleteGroup;
    LogClass *m_pLog;
    DeviceModel *model;
    QString Group1;
    QString Group2;
    QString NewGroup2;
    QString username;
    void setupUI();
    void loadData();
};
#endif // DEVICEMANAGE_H
